package org.cscarioni

import java.util.Date;

class EstimatesController {
	def estimatesService
    def goToEstimatesSavingPage = { 
    		render(view:'estimatesForm',model:['sprintId':params.sprintId])
	}
	
	def saveEstimates = {
		Date day=Date.parse("dd/MM/yyyy",params.fecha_value)
		def sprintId=params.sprintId
		estimatesService.saveEstimatesForDayAndEntity(day,Sprint.get(sprintId),this.session.project)
		redirect(controller:'sprint',action:'showPanelForSprint',params:['sprintId':sprintId])		
	}
}
